using MicroMsg.UI.Page;
using MicroMsg.UI.Util;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace MicroMsg.UI.UserContrl
{
	public class Dialog2ButtonWithCheckBox : UserControl
	{
		public delegate void dismissWithClickBtn(object sender, bool bIsPermit);
		private ModeDialogHelper mDlgHelper;
		internal Grid LayoutRoot;
		internal TextBlock txtContent;
		internal CheckBox checkBoxNoShwoAgain;
		internal Button btnPermit;
		internal Button btnReject;
		private bool _contentLoaded;
		public event Dialog2ButtonWithCheckBox.dismissWithClickBtn mBtnClick;
		private Dialog2ButtonWithCheckBox(bool isEnableBackKeyPress, Dialog2ButtonWithCheckBox.dismissWithClickBtn clickHandler)
		{
			this.InitializeComponent();
			this.LayoutRoot.set_Background(R.theme.COMMON_APPBAR_BK_BRUSH);
			this.mDlgHelper = new ModeDialogHelper(this, isEnableBackKeyPress, (SolidColorBrush)Application.get_Current().get_Resources().get_Item("NearOpacityBrush1"), false);
			this.mBtnClick += clickHandler;
		}
		public static Dialog2ButtonWithCheckBox Show(Dialog2ButtonWithCheckBox.dismissWithClickBtn clickHandler)
		{
			Dialog2ButtonWithCheckBox dialog2ButtonWithCheckBox = new Dialog2ButtonWithCheckBox(true, clickHandler);
			dialog2ButtonWithCheckBox.mDlgHelper.Show();
			return dialog2ButtonWithCheckBox;
		}
		private void btnPermit_Click(object sender, RoutedEventArgs e)
		{
			if (this.mBtnClick != null)
			{
				this.mBtnClick(this, true);
			}
			this.mDlgHelper.Hide(null);
		}
		private void btnReject_Click(object sender, RoutedEventArgs e)
		{
			if (this.mBtnClick != null)
			{
				this.mBtnClick(this, false);
			}
			this.mDlgHelper.Hide(null);
		}
		private void checkBoxNoShwoAgain_Click(object sender, RoutedEventArgs e)
		{
		}
		[DebuggerNonUserCode]
		public void InitializeComponent()
		{
			if (this._contentLoaded)
			{
				return;
			}
			this._contentLoaded = true;
			Application.LoadComponent(this, new Uri("/MicroMsg;component/Source/Plugin/Lbs/UI/Dialog2ButtonWithCheckBox.xaml", 2));
			this.LayoutRoot = (Grid)base.FindName("LayoutRoot");
			this.txtContent = (TextBlock)base.FindName("txtContent");
			this.checkBoxNoShwoAgain = (CheckBox)base.FindName("checkBoxNoShwoAgain");
			this.btnPermit = (Button)base.FindName("btnPermit");
			this.btnReject = (Button)base.FindName("btnReject");
		}
	}
}
